/*从上往下打印出二叉树的每个节点，同层节点从左至右打印。
bfs
*/
vector<int> PrintFromTopToBottom(TreeNode* rt) 
{
		queue<TreeNode*> q;
        q.push(rt);
        vector<int> r;
        while(!q.empty()){
            rt = q.front(); q.pop();
            if(!rt) continue;
            r.push_back(rt -> val);
            q.push(rt -> left);
            q.push(rt -> right);
        }
        return r;
 
}